package com.ruoyi.planthopper.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: class by cxf
 * @author: AbrahamBill
 * @date: 2022/7/25
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RetForExcelSheet2 {
    /**
     * 日期
     */
    @ExcelProperty(value = "日期",index = 0)
    private String time;
    /**
     * 地块名称
     */
    @ExcelProperty(value = "地块",index = 1)
    private String plotName;
    /**
     * 飞虱种类
     */
    @ExcelProperty(value = "飞虱种类", index = 2)
    private String planthopperCategory;

    @ExcelProperty(value = "图片数目", index=3)
    private int imgCount;
    /**
     * 虫数总计
     */
    @ExcelProperty(value = "飞虱总数", index = 4)
    private int sum;
    @ExcelProperty(value = "长翅褐飞虱成虫",index = 5)
    private int M_BPH_adult;
    @ExcelProperty(value = "短翅褐飞虱成虫",index = 6)
    private int B_BPH_adult;
    @ExcelProperty(value = "高龄褐飞虱若虫",index =7)
    private int S_BPH_nymph;
    @ExcelProperty(value = "长翅白背飞虱成虫",index =8)
    private int M_WBPH_adult;
    @ExcelProperty(value = "短翅白背飞虱成虫",index = 9)
    private int B_WBPH_adult;
    @ExcelProperty(value = "高龄白背飞虱若虫",index = 10)
    private int S_WBPH_nymph;
    @ExcelProperty(value = "低龄稻飞虱若虫",index = 11)
    private int J_RPH_nymph;
    @ExcelProperty(value = "长翅灰飞虱成虫",index = 12)
    private int M_SBPH_adult;
    @ExcelProperty(value = "短翅灰飞虱成虫",index = 13)
    private int B_SBPH_adult;
    @ExcelProperty(value = "高龄灰飞虱若虫",index = 14)
    private int S_SBPH_nymph;
    @ExcelProperty(value = "蜘蛛",index = 15)
    private int Spider;
    @ExcelProperty(value = "蝽",index = 16)
    private int Miridae;
    @ExcelProperty(value = "隐翅甲",index = 17)
    private int Rove_beetle;
    @ExcelProperty(value = "叶蝉成虫",index = 18)
    private int RLH_adult;
    @ExcelProperty(value = "叶蝉若虫",index = 19)
    private int RLH_nymph;

    public RetForExcelSheet2(InvesInfo invesInfo){
        this.time = invesInfo.getInsertDate();
        this.plotName = invesInfo.getPlotName();
        this.planthopperCategory = invesInfo.getPlanthopperCategory();
        this.imgCount = 0;
        this.sum = invesInfo.getSum();
        this.M_BPH_adult=invesInfo.getMBphAdult();
        this.B_BPH_adult=invesInfo.getBBphAdult();
        this.S_BPH_nymph=invesInfo.getSBphNymph();
        this.M_WBPH_adult=invesInfo.getMWbphAdult();
        this.B_WBPH_adult=invesInfo.getBWbphAdult();
        this.S_WBPH_nymph=invesInfo.getSWbphNymph();
        this.J_RPH_nymph=invesInfo.getJRphNymph();
        this.M_SBPH_adult=invesInfo.getMSbphAdult();
        this.B_SBPH_adult=invesInfo.getBSbphAdult();
        this.S_SBPH_nymph=invesInfo.getSSbphNymph();
        this.Spider=invesInfo.getSpider();
        this.Miridae=invesInfo.getMiridae();
        this.Rove_beetle=invesInfo.getRoveBeetle();
        this.RLH_adult=invesInfo.getRlhAdult();
        this.RLH_nymph=invesInfo.getRlhNymph();
    }

    public void SameDayAdd(InvesInfo invesInfo){
        this.setSum(this.sum+invesInfo.getSum());
        this.setM_BPH_adult(this.M_BPH_adult+invesInfo.getMBphAdult());
        this.setB_BPH_adult(this.B_BPH_adult+invesInfo.getBBphAdult());
        this.setS_BPH_nymph(this.S_BPH_nymph+invesInfo.getSBphNymph());
        this.setM_WBPH_adult(this.M_WBPH_adult+invesInfo.getMWbphAdult());
        this.setB_WBPH_adult(this.B_WBPH_adult+invesInfo.getBWbphAdult());
        this.setS_WBPH_nymph(this.S_WBPH_nymph+invesInfo.getSWbphNymph());
        this.setJ_RPH_nymph(this.J_RPH_nymph+invesInfo.getJRphNymph());
        this.setM_SBPH_adult(this.M_SBPH_adult+invesInfo.getMSbphAdult());
        this.setB_SBPH_adult(this.B_SBPH_adult+invesInfo.getBSbphAdult());
        this.setS_SBPH_nymph(this.S_SBPH_nymph+invesInfo.getSSbphNymph());
        this.setSpider(this.Spider+invesInfo.getSpider());
        this.setMiridae(this.Miridae+invesInfo.getMiridae());
        this.setRove_beetle(this.Rove_beetle+invesInfo.getRoveBeetle());
        this.setRLH_adult(this.RLH_adult+invesInfo.getRlhAdult());
        this.setRLH_nymph(this.RLH_nymph+invesInfo.getRlhNymph());
    }
}
